import { defineStore } from 'pinia';
const useOrderStore = defineStore(
    'order',
    {
        state: () => ({
            pcbOrderInfo: {},
            smtOrderInfo: {},
            pcbSelectedListMap: {},
            smtSelectedListMap: {},
        }),

        actions: {
            // pcb下单信息
            setPcbOrderInfo(pcbOrderInfo) {
                this.pcbOrderInfo = pcbOrderInfo
            },
            // smt下单信息
            setSmtOrderInfo(smtOrderInfo) {
                this.smtOrderInfo = smtOrderInfo
            },
            // pcb选中的服务工艺数据信息
            setPcbSelectedListMap(pcbSelectedListMap) {
                this.pcbSelectedListMap = pcbSelectedListMap
            },
            // smt选中的服务工艺数据信息
            setSmtSelectedListMap(smtSelectedListMap) {
                this.smtSelectedListMap = smtSelectedListMap
            },
        },
        persist: true,  // 启用持久化
    })

export default useOrderStore
